﻿using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

/// <summary>
/// Class1 的摘要说明
/// </summary>
public class zxdstring
{
    #region 公共属性

    /// <summary>  
    /// 构造函数
    /// </summary> 
    public zxdstring()
	{
		//
		// TODO: 在此处添加构造函数逻辑
		//
    }
    /// <summary>  
    /// //去掉A串中的所有重复串,形如",xxx,"
    /// </summary> 
    public string diststr(string zstrA)
    {
        
        string zresult = "";
        string zstrB = "";

        while (zstrA.Length > 0)
        {
            while (zstrA.IndexOf(",") == 0) //去掉第一个"'"
            {
                zstrA = zstrA.Substring(1);
            }

            zstrB = "," + zstrA.Substring(0, zstrA.IndexOf(",") + 1);
            zstrA = "," + zstrA;
            zresult += zstrB;
            //zstrA = delstring(zstrA, zstrB);
            zstrA = zstrA.Replace(zstrB, "");

        }
        return zresult;
    }
    #endregion
}
